package com.insta.formation.calendar.manager;

import com.insta.formation.calendar.model.Person;

/**
 * 	User Manager
 * 
 * @author Julien
 *
 */
public interface IUserManager
{
	/**
	 * 	Create a new user
	 * 
	 * @param email - email of the user
	 * @param firstName - firstname of the user
	 * @param lastName - lastname of the user
	 * @return true if create, otherwise false
	 */
	public boolean createUser(String email, String firstName, String lastName);

	/**
	 * 	Check if a user exists
	 * 
	 * @param email - email of the user
	 * @return true if the user exists, otherwise fakse
	 */
	public boolean existUser(String email);
	
	/**
	 * 	Get a user
	 * 
	 * @param email - email of the user
	 * @return user if the user exists, otherwise null
	 */
	public Person retreiveUser(String email);
	
	/**
	 * 	Update a user
	 * 
	 * @param person - user updated
	 * @return true if update, otherwise false
	 */
	public boolean updateUser(Person person);

	/**
	 * 	Delete a user
	 * 
	 * @param email - email of the user
	 * @return true if delete, otherwise false
	 */
	public boolean deleteUser(String email);
}
